#ifndef __UNIT_WAIT_QUEUE__
#define __UNIT_WAIT_QUEUE__

struct work_queue_item {
	void (*call) (void *args);
	void *args;
	struct list list;
};

struct work_queue {
	struct object parent;
	struct work_queue_item item;
};

extern err_t work_queue_init(void);

extern err_t work_queue_attach_item(struct work_queue_item *item);
extern err_t work_queue_register_item(void (*call) (void *args), void *args);

extern struct work_queue_item *work_queue_take_item(void);

#endif /* __UNIT_WAIT_QUEUE__ */
